/******************************************************************************
 *  Copyright (C) Cambridge Silicon Radio Limited 2015
 *
 *  This software is provided to the customer for evaluation
 *  purposes only and, as such early feedback on performance and operation
 *  is anticipated. The software source code is subject to change and
 *  not intended for production. Use of developmental release software is
 *  at the user's own risk. This software is provided "as is," and CSR
 *  cautions users to determine for themselves the suitability of using the
 *  beta release version of this software. CSR makes no warranty or
 *  representation whatsoever of merchantability or fitness of the product
 *  for any particular purpose or use. In no event shall CSR be liable for
 *  any consequential, incidental or special damages whatsoever arising out
 *  of the use of or inability to use this software, even if the user has
 *  advised CSR of the possibility of such damages.
 *
 ******************************************************************************/
package com.csr.vmupgradelibrary.codes;

/**
 * <p>This class gives all codes the board may send - after a command or asynchronously. These codes are encapsulated into an UPDATE_ERRORWARN_IND message.</p>
 * <ul>
 * <li>Errors are considered as fatal: the board will abort the process.</li>
 * <li>Warnings are considered as informational: the board will choose to abort or continue the process.</li>
 * </ul>
 */

public final class ReturnCodes {

    public static final int ERROR_UNKNOWN_ID = 0x11;
    public static final int ERROR_BAD_LENGTH_DEPRECATED = 0x12;
    public static final int ERROR_WRONG_VARIANT = 0x13;
    public static final int ERROR_WRONG_PARTITION_NUMBER = 0x14;
    public static final int ERROR_PARTITION_SIZE_MISMATCH = 0x15;
    public static final int ERROR_PARTITION_TYPE_NOT_FOUND = 0x16;
    public static final int ERROR_PARTITION_OPEN_FAILED = 0x17;
    public static final int ERROR_PARTITION_WRITE_FAILED = 0x18;
    public static final int ERROR_PARTITION_CLOSE_FAILED_1 = 0x19;
    public static final int ERROR_SFS_VALIDATION_FAILED = 0x1A;
    public static final int ERROR_OEM_VALIDATION_FAILED = 0x1B;
    public static final int ERROR_UPDATE_FAILED = 0x1C;
    public static final int ERROR_APP_NOT_READY = 0x1D;
    public static final int ERROR_LOADER_ERROR = 0x1E;
    public static final int ERROR_UNEXPECTED_LOADER_MSG = 0x1F;
    public static final int ERROR_MISSING_LOADER_MSG = 0x20;
    public static final int ERROR_BATTERY_LOW = 0x21;
    public static final int ERROR_BAD_LENGTH_PARTITION_PARSE = 0x38;
    public static final int ERROR_BAD_LENGTH_TOO_SHORT = 0x39;
    public static final int ERROR_BAD_LENGTH_UPGRADE_HEADER = 0x3A;
    public static final int ERROR_BAD_LENGTH_PARTITION_HEADER = 0x3B;
    public static final int ERROR_BAD_LENGTH_SIGNATURE = 0x3C;
    public static final int ERROR_BAD_LENGTH_DATAHDR_RESUME = 0x3D;
    public static final int ERROR_PARTITION_CLOSE_FAILED_2 = 0x40;
    public static final int ERROR_PARTITION_CLOSE_FAILED_HEADER = 0x41;
    public static final int ERROR_PARTITION_TYPE_NOT_MATCHING = 0x48;
    public static final int ERROR_PARTITION_TYPE_TWO_DFU = 0x49;
    public static final int ERROR_PARTITION_WRITE_FAILED_HEADER = 0x50;
    public static final int ERROR_PARTITION_WRITE_FAILED_DATA = 0x51;
    public static final int ERROR_INTERNAL_ERROR_1 = 0x65;
    public static final int ERROR_INTERNAL_ERROR_2 = 0x66;
    public static final int ERROR_INTERNAL_ERROR_3 = 0x67;
    public static final int ERROR_INTERNAL_ERROR_4 = 0x68;
    public static final int ERROR_INTERNAL_ERROR_5 = 0x69;
    public static final int ERROR_INTERNAL_ERROR_6 = 0x6A;
    public static final int ERROR_INTERNAL_ERROR_7 = 0x6B;
    public static final int WARN_APP_CONFIG_VERSION_INCOMPATIBLE = 0x80;
    /**
     * This error means the file is already uploaded onto the board.
     */
    public static final int WARN_SYNC_ID_IS_DIFFERENT = 0x81;

}
